Technical Field
The invention relates to a system, gateway, and method for automatic setting configuration and, in particular, to a system, gateway, and method of automatic setting configuration by learning commands.
Related Art
When devices in two networks that use different communication protocols want to exchange data, one needs a gateway that can integrate the communication protocols used by the two networks. That is, when one device transmits target data to the gateway, the gateway obtains the target data according to the protocol of the data-transmitting device, and relays to the target data to the data-receiving device according to the corresponding protocol.
In order for the gateway that mediates different networks to correctly obtain the target data using the protocol of the data-transmitting device and to use the protocol of the data-receiving device to correctly provide the target data, the gateway needs to be set correctly by the user.
According to the current method of setting the gateway between different networks, one has to first look up a datasheet to obtain the parameters of device ID/Address, supported commands, data storage location, data length, and polling interval of each of the data-receiving devices. According to the parameters, communication commands that may be used to pass target data to the data-receiving device are set in the gateway. Afterwards, the internal memory of the gateway is configured such that the data accessed by the above-mentioned communication commands are mapped to the configured storage space. The I/O module that accesses the internal memory of the gateway for exchange the target data between the data-transmitting device and the gateway is also configured. Afterwards, the user starts to test whether the above settings are correct, i.e., testing whether target data are correctly transmitted. If not, then incorrect settings are modified until they are all correct.
In practice, since setting a command requires many parameters and a system usually works with tens to one hundred commands that it may take the user a few hours to several days to set these parameters. In addition to incorrect settings, one has to continuously test in order to make sure that the settings are completely correct. It is very time-consuming and inconvenient.
In summary, the prior art always has the problems of inconvenience and time waste in setting the gateway that connects different networks. It is thus imperative to provide a better solution.